//前端路径
var szoapcpath = '/pc';
//系统默认图片
window.default_image = szoapcpath + "/static/img/default.png";
if (typeof (top.load_add) == 'function') top.load_add();
function load_init_css() {
  // 公用css
  var css = [
    szoapcpath + '/static/lib/fontawesome/css/font-awesome.min.css',
    szoapcpath + '/static/lib/layui/css/layui.css',
    szoapcpath + '/static/kaige/css/kaige.css',
  ];
  for (var i in css) {
    document.write('<link rel="stylesheet" href="' + css[i] + '" />');
  }
}
load_init_css();
function load_init_js(jsarr, callback) {
  if (typeof (jsarr) === 'function') {
    callback = jsarr;
    jsarr = false;
  }
  // 公用js
  var js = [
    szoapcpath + '/static/lib/jquery/jquery.min.js',
    szoapcpath + '/static/kaige/js/qs.js',
    szoapcpath + '/static/kaige/js/cry/md5.js',
    szoapcpath + '/static/kaige/js/cry/sha1.js',
    szoapcpath + '/static/kaige/js/szconfig.js',
    szoapcpath + '/static/kaige/js/szoa.js',
    szoapcpath + '/static/lib/layui/layui.js',
    szoapcpath + '/static/kaige/js/files.js',
    szoapcpath + '/static/kaige/js/kaige_other.js'
  ];
  if (jsarr) {
    for (var i in jsarr) {
      js.push(jsarr[i])
    }
  }
  for (var i in js) {
    document.write('<script src="' + js[i] + '"></script>');
  }
  setTimeout(function () {
    typeof (callback) === 'function' && callback();
    if (typeof (top.load_del) == 'function') top.load_del();
  }, 300);
}

/**
 * 全局Layui配置
 */
function layuiLoadConfig() {
  if (typeof (layui) === "object") {
    layui.config({
      base: szoapcpath + '/static/kaige/layuiextend/'
      , version: 20220425
    }).extend({
      dtree: "dtree/dtree",
      echarts: "echarts/echarts",
      echartsTheme: "echarts/echartsTheme",
      layarea: "layarea/layarea",
    });
  }
}
